﻿
Partial Class WebForm_ManageBanner_AddBanner
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    'Delegate-AfterSaveToolBar1Click
    Public Event AfterSaveToolBar1Click(ByVal source As Object, ByVal e As System.EventArgs)

    Protected Sub SaveToolBar1_Saving(ByVal sender As Object, ByVal e As System.EventArgs) Handles SaveToolBar1.Saving

        If BannerUploader1.SaveData() Then
            RaiseEvent AfterSaveToolBar1Click(sender, e)
        End If
    End Sub

    Protected Sub SaveToolBar1_Canceling(ByVal sender As Object, ByVal e As System.EventArgs) Handles SaveToolBar1.Canceling

        RaiseEvent AfterSaveToolBar1Click(sender, e)

    End Sub


End Class

Partial Class WebForm_ManageBanner_AddBanner

    Public Sub InitData(ByVal BannerID As Integer)

        BannerUploader1.FileClass = "Banner"
        BannerUploader1.FileType = String.Empty
        BannerUploader1.BannerID = BannerID

        If String.IsNullOrEmpty(BannerUploader1.FileSavePath) Then

            Dim sql As New MyStringBuilder
            Dim dat As New clsData

            sql.Length = 0
            sql.AppendFormat("SELECT FilePath ")
            sql.AppendFormat("FROM FD_FileGroup ")
            sql.AppendFormat("WHERE FileGroupID='{0}' ", BannerUploader1.FileClass)

            BannerUploader1.FileSavePath = dat.GetSingleData(sql.ToString)

        End If

        BannerUploader1.InitData()

    End Sub

End Class
